Developer Documentation

QuickTime 4 API Documentation

Programming With QuickTime VR

| Previous | Chapter Contents | Chapter Top | Next |

Managing QuickTime VR Movie Interaction

The QuickTime VR Manager provides functions that you can use to augment the normal user interaction handling provided by a QuickTime movie controller. For example, you can install an action filter function to handle movie controller actions; see QuickTime  3 Reference for details.

QTVRSetEnteringNodeProc

You can use the QTVRSetEnteringNodeProc function to install or remove a node-entering procedure.

OSErr QTVRSetEnteringNodeProc (
                     QTVRInstanceqtvr,
                     QTVREnteringNodeUPPenteringNodeProc,
                     SInt32refCon,
                     UInt32 flags);
qtvr
An instance of a QuickTime VR movie.
enteringNodeProc
A universal procedure pointer for a node-entering procedure. See "MyEnteringNodeProc" for information about node-entering procedures.
refCon
A reference constant. This value is passed to the specified node-entering procedure.
flags
Unused. Set this parameter to 0.
function result
A result code.

DESCRIPTION

The QTVRSetEnteringNodeProc function installs the procedure specified by the enteringNodeProc parameter as a node-entering procedure for the QuickTime VR movie specified by the qtvr parameter. Your procedure is called whenever a node is entered (either in response to user actions or in response to QuickTime VR Manager functions that change nodes). The reference constant specified by the refCon parameter is passed unchanged to that node-entering procedure.

To remove a previously installed node-entering procedure, set enteringNodeProc to nil .

SEE ALSO

Use QTVRSetLeavingNodeProc (next) to install or remove a node-leaving procedure.

QTVRSetLeavingNodeProc

You can use the QTVRSetLeavingNodeProc function to install or remove a node-leaving procedure.

OSErr QTVRSetLeavingNodeProc (
                     QTVRInstanceqtvr,
                     QTVRLeavingNodeUPPleavingNodeProc,
                     SInt32refCon,
                     UInt32 flags);
qtvr
An instance of a QuickTime VR movie.
leavingNodeProc
A universal procedure pointer for a node-leaving procedure. See "MyLeavingNodeProc" for information about node-leaving procedures.
refCon
A reference constant. This value is passed to the specified node-leaving procedure.
flags
Unused. Set this parameter to 0.
function result
A result code.

DESCRIPTION

The QTVRSetLeavingNodeProc function installs the procedure specified by the leavingNodeProc parameter as a node-leaving procedure for the QuickTime VR movie specified by the qtvr parameter. Your procedure is called whenever a node is left (either in response to user actions or in response to QuickTime VR Manager functions that change nodes). The reference constant specified by the refCon parameter is passed unchanged to that node-leaving procedure.

To remove a previously installed node-leaving procedure, set leavingNodeProc to nil .

SEE ALSO

Use QTVRSetEnteringNodeProc to install or remove a node-entering procedure.

QTVRGetInteractionProperty

You can use the QTVRGetInteractionProperty function to get the value of an interaction property.

OSErr QTVRGetInteractionProperty (
                     QTVRInstance qtvr,
                     UInt32 property,
                     void*value);
qtvr
An instance of a QuickTime VR movie.
property
An interaction property type. See "Interaction Property Types" for a description of the available types of interaction properties.
value
On entry, a pointer to a block of memory. On exit, that memory contains the current value of the specified interaction property.
function result
A result code.

DESCRIPTION

The QTVRGetInteractionProperty function returns, in the block of memory pointed to by the value parameter, the current value of the property specified by the property parameter for the QuickTime VR movie specified by the qtvr  parameter. That block of memory must be large enough to hold the returned value.

SEE ALSO

Use QTVRSetInteractionProperty (next) to set an interaction property.

QTVRSetInteractionProperty

You can use the QTVRSetInteractionProperty function to set the value of an interaction property.

OSErr QTVRSetInteractionProperty (
                     QTVRInstanceqtvr,
                     UInt32 property,
                     void*value);
qtvr
An instance of a QuickTime VR movie.
property
An interaction property type. See "Interaction Property Types" for a description of the available types of interaction properties.
value
The desired value of the specified interaction property.
function result
A result code.

DESCRIPTION

The QTVRSetInteractionProperty function sets the value of the interaction property of the type specified by the property parameter for the movie specified by the qtvr parameter to the value specified by the value parameter. For types that occupy 32 or fewer bits of memory, you pass the desired value itself (cast to a void * ) in the value parameter. For structures and floating-point values, you must pass a pointer to the desired value in the value parameter.

Floating-point values are usually stored as 32-bit values, but compilers differ in how they pass floating-point values as parameters; as a result, QTVRSetInteractionProperty demands that floating-point values always be passed by reference.

SEE ALSO

Use QTVRGetInteractionProperty to get an interaction property.

QTVRReplaceCursor

You can use the QTVRReplaceCursor function to replace any of the standard QuickTime VR cursors with your own custom cursors.

OSErr QTVRReplaceCursor (QTVRInstanceqtvr, CursorRecord *cursRecord);
qtvr
An instance of a QuickTime VR movie.
cursRecord
A pointer to a cursor record. See "Cursor Record" for a description of the cursor record.
function result
A result code.

DESCRIPTION

The QTVRReplaceCursor function replaces one or more of the standard QuickTime VR cursors associated with the instance specified by the qtvr parameter with the cursors specified in the cursor record pointed to by the cursRecord parameter. If the type field of the specified cursor record is kQTVRUseDefaultCursor , the default cursor for the given resource ID is reloaded; in this case, the handle field of that record should be set to nil .

QTVRReplaceCursor replaces the standard cursors only for the specified QuickTime VR movie instance. To replace the standard cursors for all QuickTime VR movie instances you create, you need to call QTVRReplaceCursor for each such instance.

QuickTime VR 2.1 makes a copy of the cursor handle specified in the cursor record. The application is responsible for disposing of its own cursor handle.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |